//
//  WZGecodeSearchShare.h
//  ETong
//
//  Created by wanzhao on 15/12/8.
//  Copyright (c) 2015年 wanzhao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <BaiduMapAPI_Search/BMKSearchComponent.h>

@protocol WZGecodeSearchShareDelegate <NSObject>

/**
 *返回地址信息搜索结果
 *@param searcher 搜索对象
 *@param result 搜索结BMKGeoCodeSearch果
 *@param error 错误号，@see BMKSearchErrorCode
 */
- (void)wzOnGetGeoCodeResult:(BMKGeoCodeSearch *)searcher result:(BMKGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error;

/**
 *返回反地理编码搜索结果
 *@param searcher 搜索对象
 *@param result 搜索结果
 *@param error 错误号，@see BMKSearchErrorCode
 */
- (void)wzOnGetReverseGeoCodeResult:(BMKGeoCodeSearch *)searcher result:(BMKReverseGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error;


@end


@interface WZGecodeSearchShare : NSObject

+ (WZGecodeSearchShare *)geoCodeSearchShareInstance;
@property (nonatomic, weak) id<WZGecodeSearchShareDelegate> gecodeDelegate;
/**
 *根据地址名称获取地理信息
 *异步函数，返回结果在BMKGeoCodeSearchDelegate的onGetAddrResult通知
 *@param geoCodeOption       geo检索信息类
 *@return 成功返回YES，否则返回NO
 */
- (BOOL)wzGeoCode:(BMKGeoCodeSearchOption*)geoCodeOption;
/**
 *根据地理坐标获取地址信息
 *异步函数，返回结果在BMKGeoCodeSearchDelegate的onGetAddrResult通知
 *@param reverseGeoCodeOption 反geo检索信息类
 *@return 成功返回YES，否则返回NO
 */
- (BOOL)wzReverseGeoCode:(BMKReverseGeoCodeOption*)reverseGeoCodeOption;


@end
